package org.limakilo.Controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.limakilo.interfaces.IController;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class TestController implements IController {
@NacosValue("${name}")
    String name;

    @Override
    @RequestMapping("/test")
    @ResponseBody
    public String test() {
        return name;
    }

    @Override
    @RequestMapping("/hello")
    @ResponseBody
    public String hello() throws InterruptedException {
        Thread.sleep(10000);
        return "hello";
    }
}
